﻿<Page x:Class="TV4Home.Client.Desktop.QuickEPG.Pages.Schedules"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:my="clr-namespace:TV4Home.Client.Desktop.QuickEPG.Pages"
        mc:Ignorable="d"   Loaded="Page_Loaded" Margin="0,0,0,0"  HorizontalAlignment="Stretch" VerticalAlignment="Stretch">

    <Page.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Assets/Styles.xaml"/>
                <ResourceDictionary Source="/Assets/CoreStyles.xaml"/>
                <ResourceDictionary Source="/Assets/CommonResources.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <my:DateTimeConverter x:Key="dateConverter"/>
        </ResourceDictionary>

    </Page.Resources>

    <Grid Margin="0,0,0,0"  HorizontalAlignment="Stretch" VerticalAlignment="Stretch">

        <Grid  Margin="5">
            <Rectangle Margin="0,0,0,0" Stroke="WhiteSmoke" Fill="Transparent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
                <Rectangle.Effect>
                    <DropShadowEffect Opacity="0.5" BlurRadius="14" ShadowDepth="0" Color="#FF434343"/>
                </Rectangle.Effect>
            </Rectangle>
            <Grid Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">

                <ListBox ScrollViewer.VerticalScrollBarVisibility="Disabled" HorizontalAlignment="Stretch" Margin="1,1,1,1" Name="lbRecordings" VerticalAlignment="Stretch" Background="#00000000">
                    <ListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                            <WrapPanel Orientation="Vertical"/>
                        </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                    <ListBox.ItemTemplate>                        
                        <DataTemplate>
                            <Border>
                                <Grid MinWidth="200" MaxWidth="200" >
                                    <Rectangle Margin="1" Stroke="#FF2D2D2D" Fill="Transparent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                                        <Rectangle.Effect>
                                            <DropShadowEffect Opacity="0.695" BlurRadius="14" ShadowDepth="0" Color="#FF434343"/>
                                        </Rectangle.Effect>
                                    </Rectangle>
                                    <StackPanel Margin="3">
                                        <DockPanel >
                                            <TextBlock FontWeight="Bold" Text="Sendung:" DockPanel.Dock="Left" Margin="5,0,10,0"/>
                                            <TextBlock Text="  " />
                                            <TextBlock FontWeight="Bold" Text="{Binding Path=ProgramName}"  />
                                        </DockPanel>
                                        <DockPanel >
                                            <TextBlock FontWeight="Bold" Text="Beginn:" DockPanel.Dock="Left" Margin="5,0,5,0"/>
                                            <TextBlock Text="  " />
                                            <TextBlock Text="{Binding Path=StartTime,Converter={StaticResource dateConverter}}" />
                                        </DockPanel>
                                        <DockPanel >
                                            <TextBlock FontWeight="Bold" Text="Ende:" DockPanel.Dock="Left" Margin="5,0,5,0"/>
                                            <TextBlock Text="  " />
                                            <TextBlock Text="{Binding Path=EndTime,Converter={StaticResource dateConverter}}" />
                                        </DockPanel>
                                    </StackPanel>
                                </Grid>
                            </Border>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                    <ListBox.ItemContainerStyle>
                        <Style TargetType="ListBoxItem">
                            <EventSetter Event="ListBoxItem.Selected" Handler="lbRecordings_Selected" HandledEventsToo="True"/>
                        </Style>
                    </ListBox.ItemContainerStyle>
                </ListBox>
            </Grid>
        </Grid>



        <Border x:Name="brdDetails" Margin="50,20,50,20" Panel.ZIndex="1" >
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="25" />
                    <ColumnDefinition Width="420*" />
                    <ColumnDefinition Width="25" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="27" />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Rectangle x:Name="details_overlay" Visibility="Hidden"  Fill="WhiteSmoke" Stroke="#FF2D2D2D" Grid.RowSpan="2" Grid.ColumnSpan="3">
                    <Rectangle.Effect>
                        <DropShadowEffect Opacity="0.695" BlurRadius="14" ShadowDepth="0" Color="#FF434343"/>
                    </Rectangle.Effect>
                </Rectangle>
                <Rectangle Name="topRectangle" Grid.Column="1" Grid.Row="0" Fill="{StaticResource BaseBlueBrush}" Visibility="Hidden" />
                <Button Name="btnCloseDetails" HorizontalAlignment="Right" Margin="3" VerticalAlignment="Top" Visibility="Hidden"
				Style="{StaticResource SemiTransparentButton2}" ButtonBase.Click="btnCloseDetails_Click" Grid.Column="1" Grid.Row="0">
                    <TextBlock TextWrapping="Wrap" Text="r" FontFamily="Webdings" FontSize="13.333" />
                </Button>
                <Grid Grid.Column="1" Grid.Row="1">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="37" />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="28" />
                        <RowDefinition Height="28" />
                        <RowDefinition Height="260*" />
                        <RowDefinition Height="35" />
                    </Grid.RowDefinitions>

                    <Label Style="{StaticResource ResourceKey=SegoeUILabel}" Content="Titel:" HorizontalAlignment="Left" VerticalAlignment="Top" Name="lblTitle"  MinHeight="24" Visibility="Hidden" />
                    <TextBox Grid.Column="1" MinHeight="24" Name="tbProgramTitle" AcceptsTab="False" IsReadOnly="True" Background="#00000000" Visibility="Hidden"  HorizontalAlignment="Left" VerticalAlignment="Top" Margin="2"  />
                    
                    <Label Grid.ColumnSpan="2" Grid.Row="1" Style="{StaticResource ResourceKey=SegoeUILabel}" Content="Beschreibung:" HorizontalAlignment="Left" VerticalAlignment="Top" Name="lblDescription" MinHeight="24" MinWidth="94" Visibility="Hidden" />
                    <TextBox Grid.ColumnSpan="2"  Grid.Row="2"  Name="tbProgramDescription" AcceptsReturn="True" TextWrapping="Wrap" IsReadOnly="True" HorizontalScrollBarVisibility="Auto" Background="#00000000" Visibility="Hidden" Margin="3" />


                    <Button Grid.ColumnSpan="2"  Style="{StaticResource ResourceKey=SemiTransparentButton}" Content="Aufnahme abbrechen" x:Name="btnCancelSchedule" Grid.Row="3" MaxHeight="32" MaxWidth="135" Margin="3,3,4,3" HorizontalAlignment="Right" VerticalAlignment="Bottom" Click="btnCancelSchedule_Click" Visibility="Hidden"/>
                </Grid>
            </Grid>
        </Border>
        <Rectangle x:Name="complete_overlay" Fill="Transparent" Stroke="Transparent" Visibility="Hidden" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0" MouseLeftButtonDown="complete_overlay_MouseLeftButtonDown"/>

    </Grid>
</Page>